<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    //小球落地
    //var h = 100;
    //var sum = 0;
    //for(var i = 0; 1<10;i++){
    //    sum += h +h/2
    //    h = h + h/2
    //}
    //console.log(h);
    //console.log(sum);

//0-100奇数的和
var i=0,sum = 0;
while(i <= 100){
    if(i % 2 == 1){
        sum += i
    }
    i++
}
console.log(sum);
</script>